package com.repository;

import java.util.List;

import com.model.User;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Component;
@Component
public interface UserRepository extends Repository<User, Long>
{
    @Query(value = "from User s where s.name=:name")
    List<User> findByName(@Param("name") String name);
}